{extend name="../../admin/view/main"}

{block name="content"}
{foreach $list as $key => $vo}
<p>{$vo.short|default=''} | {$vo.name|default=''}</p>
{/foreach}

{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}

<div id="test1"></div>


{/block}

{block name='script'}
<script>
layui.config({
    base: 'static/plugs/layui.tableTree/'
}).use(['tree'], function () {
    var tree = layui.tree;

    //渲染
    var inst1 = tree.render({
        elem: '#test1'  //绑定元素
        ,data: [{
            title: '江西' //一级菜单
            ,children: [{
                title: '南昌' //二级菜单
                ,children: [{
                    title: '高新区' //三级菜单
                    //…… //以此类推，可无限层级
                }]
            }]
        },{
            title: '陕西' //一级菜单
            ,children: [{
                title: '西安' //二级菜单
            }]
        }]
    });
});
</script>

{/block}
